#include <stdio.h>
#include <string.h>
#include"MyString.h"
#define Arraylen(s) sizeof(s) / sizeof(s[0])
int main()
{
    int len = strlen("hello world");
    printf("%d\n", len);
    if (strcmp("hello", "helll") == 0)
    {
        printf("same\n");
    }
    if (strncmp("hello", "helloworld", 5) == 0)
    {
        printf("first 5 same\n");
    }
    char s[10] = {0};
    strncpy(s, "mike", Arraylen(s));
    printf("%s\n", s);
    char s2[10] = "milk";
    strcat(s2, "jack");
    printf("%s\n", s2);

    char cmp1[] = "helloworld";
    char cmp2[] = "world";
    char *index = strstr(cmp1, cmp2);
    if (index != NULL)
        printf("%c\n", *index);
    else
        printf("cant find!\n");
}

